//package com.cuijq.dubbo.common;
//
//import com.alibaba.cloud.nacos.registry.NacosAutoServiceRegistration;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
//import javax.annotation.PostConstruct;
//
//@Component
//public class NacosRegistrationChecker {
//    @Autowired(required = false)
//    private NacosAutoServiceRegistration autoServiceRegistration;
//
//    @PostConstruct
//    public void checkRegistration() {
//        if (autoServiceRegistration != null) {
//            autoServiceRegistration.start();
//            System.out.println("手动触发Nacos注册完成");
//        } else {
//            System.out.println("Nacos自动注册未启用");
//        }
//    }
////    @Bean
////    @ConditionalOnClass(MyService.class)
////    public MyService myService() {
////        // 可根据条件返回不同实现
////        return ServiceLoader.load(MyService.class).findFirst().orElseThrow();
////    }
//}
